package service.media_company;

import dao.Media_CompanyDAO;
import dao.RecordDuplicateException;
import entities.Media_Company;


public class Media_CompanyServiceInMemory implements Media_CompanyService {

	public Media_CompanyServiceInMemory(){
		
	}
	
	public static Media_CompanyService newInstance(){
		return new Media_CompanyServiceInMemory();
	}
	
	/**
	 * Finds a customer based on the customer id.
	 * @param userid - user id
	 * @return the instance of the customer
	 */
	public Media_Company findMedia_Company(String name){
		Media_CompanyDAO db = Media_CompanyDAO.getInstance();
		Media_Company result = null;
		result = db.findMedia_Company(name);
		return result;
	}
	
	
	/**
	 * Adds a new customer to the system.
	 * @param obj - the customer instance to add
	 */
	
	public void addMedia_Company(Media_Company obj) throws RecordDuplicateException{
		Media_CompanyDAO db = Media_CompanyDAO.getInstance();	
		db.addMedia_Company(obj);
		return;
	}

}
